<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="root"></div>
    <script src="../libs/babel.min.js"></script>
    <script src="../libs/react-17.0.2.js"></script>
    <script src="../libs/react-dom-17.0.2.js"></script>
    <script type="text/babel">
      const Child = props => {
        return <div>this is Child {props.count}</div>
      }
      const App = () => {
        const [count, setCount] = React.useState(1)
        const handleClickBtn = () => {
          setCount(count => count + 1)
        }

        React.useEffect(() => {
          setCount(count => count + 1)
        }, [])
        return (
          <div>
            <h1>this is APP header</h1>
            <div>
              <Child count={count} />
              <Child count={count + 1} />
            </div>
            <button onClick={handleClickBtn}></button>
          </div>
        )
      }
      const root = document.getElementById("root")
      ReactDOM.render(<App />, root)
      console.dir(root)
    </script>
  </body>
</html>
